<?php
namespace frontend\models;
use Yii;
use yii\base\Model;
use common\models\KnowledgerelationModel;
use yii\db\Query;
use common\models\KnowledgeModel;

class KnowledgerelationForm extends Model
{
    public $knowrelationID;
    public $knowID;
    public $knowNextID;
    
    public function getRelationList($relateID)
    {
        $model=new KnowledgerelationModel();
        $knowModel=new KnowledgeModel();
        $node=[];
        $links=[];
        $select=['knowID','knowNextID'];
        //获取关系信息
        $res=$model->find()->select($select)->where(['knowrelationID'=>$relateID])->asArray()->all();
        $know=$knowModel->find()->select(['knowID','Title'])->asArray()->all();
        foreach ($res as $value) {
//            foreach ($know as $list) {
//                if($res['knowID']==$list['knowID'])
//            }
        }
//        var_dump($know);exit;
    }
}

